package com.mes.biz.service.impl;

import java.util.List;

import com.mes.common.core.domain.BaseEntity;
import com.mes.common.core.service.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.pagehelper.PageInfo;
import com.mes.biz.mapper.BizInventoryOpeningDetailsMapper;
import com.mes.biz.domain.BizInventoryOpeningDetails;
import com.mes.biz.service.BizInventoryOpeningDetailsService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 库存期初详情Service业务层处理
 * @author wy
 * @email wy
 * @date 2023-06-08
 */
@Service
@Transactional(readOnly = true)
public class BizInventoryOpeningDetailsServiceImpl extends BaseServiceImpl<BizInventoryOpeningDetailsMapper, BizInventoryOpeningDetails> implements BizInventoryOpeningDetailsService {

    private static final Logger log = LoggerFactory.getLogger(BizInventoryOpeningDetailsServiceImpl.class);

    /**
     * 获取单条数据
     * @param bizInventoryOpeningDetails 库存期初详情
     * @return 库存期初详情
     */
    @Override
    public BizInventoryOpeningDetails get(BizInventoryOpeningDetails bizInventoryOpeningDetails) {
        BizInventoryOpeningDetails dto = super.get(bizInventoryOpeningDetails);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 库存期初详情id
     * @return 库存期初详情
     */
    @Override
    public BizInventoryOpeningDetails get(String id) {
        BizInventoryOpeningDetails dto = super.get(id);
        return dto;
    }

    /**
     * 查询库存期初详情列表
     * @param bizInventoryOpeningDetails 库存期初详情
     * @return 库存期初详情
     */
    @Override
    public List<BizInventoryOpeningDetails> findList(BizInventoryOpeningDetails bizInventoryOpeningDetails) {
		List<BizInventoryOpeningDetails> bizInventoryOpeningDetailsList = super.findList(bizInventoryOpeningDetails);
        return bizInventoryOpeningDetailsList;
    }

    /**
     * 分页查询库存期初详情列表
     * @param bizInventoryOpeningDetails 库存期初详情
     * @return 库存期初详情
     */
    @Override
    public PageInfo<BizInventoryOpeningDetails> findPage(BizInventoryOpeningDetails bizInventoryOpeningDetails) {
		PageInfo<BizInventoryOpeningDetails> page = super.findPage(bizInventoryOpeningDetails);
        return page;
    }

    /**
     * 保存库存期初详情
     * @param bizInventoryOpeningDetails
     * @return 结果
     */
    @Override
    public boolean save(BizInventoryOpeningDetails bizInventoryOpeningDetails) {
        return super.save(bizInventoryOpeningDetails);
    }

    /**
     * 删除库存期初详情信息
     * @param bizInventoryOpeningDetails
     * @return 结果
     */
    @Override
    public boolean remove(BizInventoryOpeningDetails bizInventoryOpeningDetails) {
        return super.remove(bizInventoryOpeningDetails);
    }

    /**
     * 批量删除库存期初详情
     * @param ids 需要删除的库存期初详情ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteBizInventoryOpeningDetailsByIds(String[] ids) {
        return mapper.deleteBizInventoryOpeningDetailsByIds(ids, BaseEntity.DEL_FLAG_DELETE);
    }

    @Override
    public List<BizInventoryOpeningDetails> getListByOrderNo(String orderNo) {
        return mapper.getListByOrderNo(orderNo);
    }

}
